package com.dingwen.treasure.business.controller;

import com.dingwen.treasure.base.controller.BaseViewController;
import com.dingwen.treasure.base.pojo.vo.Result;
import com.dingwen.treasure.core.annotation.ReSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ReSubmit 控制器
 *
 * @author dingwen
 * @date 2022/05/03
 */
@Api(tags = "自定义注解实现防止重复提交")
@RestController
@Slf4j
@RequestMapping("resubmit")
public class ReSubmitController implements BaseViewController {

    /**
     * 防止重复提交测试
     *
     * @return {@link Result}
     */
    @ApiOperation("防止重复提交测试")
    @GetMapping()
    @ReSubmit(message = "登录重复提交请求", isDeleteKey = false, time = 90)
    public void resubmit() {

    }
}
